﻿using UnityEngine;
using System.Collections;

namespace Inlycat.AI.BehaviorTree
{
    public class ConditionHP : BNodeCondition
    {
        public int HP;

        public ConditionHP() : base()
        {
            this.m_StrName = "ConditionHP";
        }

        public override void OnEnter(BInput input)
        {
            Debug.Log((input as TestInput).hp + "-- hp");
        }

        public override ActionResult Execute(BInput input)
        {
            TestInput tInput = input as TestInput;
            if (tInput.hp >= this.HP)
            {
                return ActionResult.SUCCESS;
            }

            return ActionResult.FAILURE;
        }
    }


}
